<form id="pagerForm" method="post" action="<?echo __WWWROOT__.'Admin/News/index.php'?>">
	<input type="hidden" name="pageNum" value="<?echo $page['pageNum']?>" >
	<input type="hidden" name="numPerPage" value="<?echo $page['numPerPage']?>" >
	<input type="hidden" name="orderField" value="<?echo $page['orderField']?>" >
	<input type="hidden" name="orderDirection" value="<?echo $page['orderDirection']?>" >
	<input type="hidden" name="type" value="<?echo isset($_POST['type'])?$_POST['type']:''?>">
	<input type="hidden" name="title" value="<?echo isset($_POST['title'])?$_POST['title']:''?>" >
	<input type="hidden" name="create_uid" value="<?echo isset($_POST['create_uid'])?$_POST['create_uid']:''?>" >
	<input type="hidden" name="create_time" value="<?echo isset($_POST['create_time'])?$_POST['create_time']:''?>" >
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="<?echo __WWWROOT__.'Admin/News/index.php'?>" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					标题：<input type="text" name="title" value="" />
				</td>
				<td>
					<select class="combox" name="type">
						<option value="">--类型--</option>
							<?foreach($types as $key=>$t){?>
							<option value="<?echo $key?>" <?echo ((isset($_POST['type'])?(int)$_POST['type']:'')==$key)?'selected':''?>><?echo $t?></option>}
							<?}?>
					</select>
				</td>
				<td>
					创建者uid：<input type="text" name="create_uid" value="" />
				</td>
				<td>
					创建日期：<input type="text" class="date" readonly="true" name="create_time" value=""/>
				</td>
				<td>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
							<li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="return navTabSearch(this);">刷新</button></div></div></li>
						</ul>
					</div>
				</td>
			</tr>
		</table>
		
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?echo __WWWROOT__.'Admin/News/add.php'?>" target="navTab"><span>添加</span></a></li>
			<li><a class="edit" href="<?echo __WWWROOT__.'Admin/News/update.php?id='?>{news_id}" target="navTab"><span>修改</span></a></li>
			<li><a class="delete" href="<?echo __WWWROOT__.'Admin/News/delete.php'?>" target="selectedTodo"  rel="ids" postType="string" title="确实要删除这些记录吗?"><span>批量删除</span></a></li>
			<li class="line">line</li>
			<li><a class="icon" href="<?echo __WWWROOT__.'Admin/News/export.php'?>"><span>导出EXCEL</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="114">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th orderField="id" class="<?echo $page['orderDirection']?>">资讯ID</th>
				<th>标题</th>
				<th>类型</th>
				<th>排序</th>
				<th>创建者</th>
				<th>创建时间</th>
				<th>修改时间</th>
				<th>点击数</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<?foreach($news as $n){?>
			<tr target="news_id" rel="<?echo $n['id']?>">
				<td><input name="ids" value="<?echo $n['id']?>" type="checkbox"></td>
				<td><?echo $n['id']?></td>
				<td><?echo $n['title']?></td>
				<td><?echo $n['type']?></td>
				<td><?echo $n['rank']?></td>
				<td><?echo $n['create_username']?></td>
				<td><?echo $n['create_time']?></td>
				<td><?echo $n['update_time']?></td>
				<td><?echo $n['clicknum']?></td>
				<td>
					<a target="ajaxTodo" href="<?echo __WWWROOT__.'Admin/News/delete.php?ids='.$n['id']?>" class="btnDel" title="确定要删除吗?">删除</a>
					<a target="navTab" href="<?echo __WWWROOT__.'Admin/News/update.php?id='.$n['id']?>" class="btnEdit">编辑</a>
				</td>
			</tr>
			<?}?>
		</tbody>
	</table>
	<?include(ROOT.'Admin/View/Include/page.php')?>
</div>
